<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<table>
    <caption>员工列表</caption>
    <tr>
        <th>名字</th><th>工资</th><th>工作</th>
    </tr>
    <!--v-for遍历数组，arr是遍历的数组变量，
    emp代表遍历出来的每一个员工对象-->
    <tr v-for="emp in arr">
        <td>{{emp.name}}</td>
        <td>{{emp.salry}}</td>
        <td>{{emp.job}}</td>
    </tr>
</table>
<!--引入vue框架-->
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script>
    let v=new Vue({
        el:"table",
        data:{
        arr:[{name:"悟空",salary:30000,job:"销售"},
             {name:"八戒",salary:25000,job:"人事"},
             {name:"沙僧",salary:28000,job:"技术"}]
    }
    })
</script>
</body>
</html>